<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="g" uri="/sunshulin"%>
<jsp:include page="/inc/header.jsp"/>
<script type="text/javascript" src="js/autocomplete.js"></script>
<script type="text/javascript" src="js/bhms.js"></script>
<link rel="stylesheet" type="text/css" href="css/autocomplete.css"/>
<script type="text/javascript">
	$(document).ready(function(){
		$("#estates").autocomplete({
			url: 'searchEstatesByPy.do',
			callBack: function(datas) {
				alert(datas.datas);
			}
		});
	});
	function doSubmit() {
		if ($.checkedForm("house", [], '')) {
			houseForm.submit();
		}
	}
</script>
<div class="grid_16" id="content">
	<!--  模块标题  -->
	<div class="grid_9">
		<h1 class="dashboard">编辑房源</h1>
	</div>
	<!-- 模块事件提示(按情况使用)是个日历 -->
	<div class="grid_6" id="eventbox">
		
	</div>
	<div class="clear"></div>
	<!-- form表单 -->
	<div class="grid_15" id="textcontent">
		<form action="enteringHouse.do" class="jNice" method="post" id="house" name="houseForm">
			<input type="hidden" name="house.id"/>
			<!-- 房源信息表；小区隐藏域 -->
			<input type="hidden" name="house.projectcode" size="15" maxlength="8"/>
		    <div>
		    	<div>小区信息</div>
		    	<div>
		    		<table width="100%" cellpadding="0" cellspacing="0" border="1">
		    			<tr>
							<td width="130" align="right"><label>房源名称：</label></td>
							<td align="left"><input type="text" name="house.title" size="15" maxlength="8"/></td>
						</tr>
						<tr>
							<td width="130" align="right"><label>房源编号：</label></td>
							<td align="left"><input type="text" name="house.house_code" size="15" maxlength="8"/></td>
						</tr>
						<tr>
							<td width="130" align="right"><label>小区简拼：</label></td>
							<td align="left"><input type="text" name="estates.projectjianpin" size="15" maxlength="8" id="estates"/></td>
						</tr>
						<tr>
							<td align="right"><label>小区名称：</label></td>
							<td align="left"><input type="text" name="house.estate_name" size="15" maxlength="25"/></td>
						</tr>
						<tr>
							<td align="right"><label>小区年份：</lable></td>
							<td align="left"><input type="text" name="house.estate_year" size="5" maxlength="4"/></td>
						</tr>
						<tr>
							<td align="right"><label>小区地址：</lable></td>
							<td align="left"><input type="text" name="house.estate_address" size="50" maxlength="100"/></td>
						</tr>
						<tr>
							<td align="right"><label>所在商圈：</lable></td>
							<td align="left">
								<g:city id="city" name="house.city" formId="city" onchange="selectDistrict(this.value);"/>&nbsp;
								<g:district id="district" formId="district" name="house.district" refId="city"/>&nbsp;
								<g:business name="house.business_circles" formId="bussiness" refId="district"/>&nbsp;
							</td>
						</tr>
						<tr>
							<td align="right"><label>最近环线：</lable></td>
							<td align="left">
								<g:cycle name="house.cycle" refId="city" formId="cucle"/>&nbsp;
								<g:face name="house.cycle_face" formId="face"/>&nbsp;
							</td>
						</tr>
						<tr>
							<td align="right"><label>最近地铁：</lable></td>
							<td align="left">
								<g:subway name="house.subway_line" refId="city" formId="subway" id="subway"/>&nbsp;
								<g:station name="house.subway_stations" refId="subway" formId="stations"/>&nbsp;
							</td>
						</tr>
						<tr>
							<td align="right"><label>距离地铁信息：</lable></td>
							<td align="left"><input type="text" size="50" maxlength="60"/></td>
						</tr>
						<tr>
							<td align="right"><label>公交线路：</lable></td>
							<td align="left"><input type="text" size="25" name="house.bus_code"/></td>
						</tr>
						<tr>
							<td align="right"><label>距离公交信息：</lable></td>
							<td align="left"><input type="text" size="50" maxlength="60"/></td>
						</tr>
					</table>
		    	</div>
		    </div>
		    <div>
		    	<div>房屋情况</div>
	    		<table width="100%" cellpadding="0" cellspacing="0" border="1">
					<tr>
						<td align="right" width="130"><label>建筑类型：</label></td>
						<td align="left" width="120"><g:dic name="house.build_type" type="BUILD_TYPE" /></td>
						<td align="right" width="150" valign="middle"><label>收房时房屋装修：</label></td>
						<td align="left" colspan="3"><g:dic name="house.original_decorate_type" type="ORIGINAL_BUILD_TYPE" /></td>
					</tr>
					<tr>
						<td align="right" width="130"><label>房屋面积：</label></td>
						<td align="left" width="120" nowrap="nowrap">
							<table>
								<tr>
									<td><input type="text" name="house.house_area" size="8" maxlength="5"/></td>
									<td align="right">&nbsp;平米</td>
								</tr>
							</table>
						</td>
						<td align="right" width="150" valign="middle"><label>房屋朝向：</label></td>
						<td align="left" width="120"><g:dic name="house.house_face" type="HOUSE_FACE" /></td>
						<td align="right" width="130" valign="middle"><label>供暖方式：</label></td>
						<td align="left"><g:dic name="house.heating" type="HEATING" /></td>
					</tr>
					<tr>
						<td align="right" width="130"><label>物业地址：</label></td>
						<td align="left" colspan="5">
							<table>
								<tr>
									<td><input type="text" name="house.building" size="4" maxlength="4"/></td>
									<td align="right">&nbsp;号楼</td>
									<td><input type="text" name="house.unit" size="4" maxlength="4"/></td>
									<td align="right">&nbsp;单元（座）</td>
									<td><input type="text" name="house.floor" size="4" maxlength="4"/></td>
									<td align="right">&nbsp;层（共</td>
									<td><input type="text" name="house.total_floor" size="4" maxlength="4"/></td>
									<td align="right">&nbsp;层）</td>
									<td><input type="text" name="house.house_number" size="4" maxlength="4"/></td>
									<td align="right">&nbsp;房屋号</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right" width="130"><label>原始户型：</label></td>
						<td align="left" colspan="5">
							<table>
								<tr>
									<td><select name="house.original_bedroom_num"><option>请选择..</option></select></td>
									<td align="right">&nbsp;室</td>
									<td><select name="house.original_living_num"><option>请选择..</option></select></td>
									<td align="right">&nbsp;厅</td>
									<td><select name="house.original_kitchen_num"><option>请选择..</option></select></td>
									<td align="right">&nbsp;卫</td>
									<td><select name="house.original_bathroom_num"><option>请选择..</option></select></td>
									<td align="right">&nbsp;厨</td>
									<td><select name="house.original_balcony"><option>请选择..</option></select></td>
									<td align="right">&nbsp;阳台</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right" width="130"><label>房屋评价：</label></td>
						<td align="left" colspan="5">
							<textarea rows="3" cols="50" name="house.house_evaluate"></textarea>
						</td>
					</tr>
					<tr>
						<td align="right" width="130"><label>交通条件：</label></td>
						<td align="left" colspan="5">
							<textarea rows="3" cols="50" name="house.traffic_evaluate"></textarea>
						</td>
					</tr>
					<tr>
						<td align="right" width="130"><label>周边环境：</label></td>
						<td align="left" colspan="5">
							<textarea rows="3" cols="50" name="house.environment_evaluate"></textarea>
						</td>
					</tr>
				</table>
		    </div>
			<table width="100%" cellpadding="0" cellspacing="0" border="1" align="center">
		    	<tr>
		    		<td align="center">
		    			<a href="javascript:void(0);" class="button_ok" onclick="doSubmit();"><span>确认</span></a>
		    		</td>
		    	</tr>
		    </table>
	    </form>
		<div class="clear"></div>
	</div>
</div>
<g:validator actionName="enteringHouse" formId="house"/>
<jsp:include page="/inc/footer.jsp"/>